<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>Theron: Theron::AllocatorManager::SetAllocator</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Theron
   &#160;<span id="projectnumber">6.00.02</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceTheron.html">Theron</a></li><li class="navelem"><a class="el" href="classTheron_1_1AllocatorManager.html">AllocatorManager</a></li>  </ul>
</div>
</div><!-- top -->
<div class="contents">
<table cellspacing="0" cellpadding="0" border="0">
  <tr>
   <td valign="top">
      <div class="navtab">
        <table>
          <tr><td class="navtab"><a class="qindex" href="classTheron_1_1AllocatorManager_ae9038770699e0ff14c0dd68378e8ad90.html#ae9038770699e0ff14c0dd68378e8ad90">GetAllocator</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="classTheron_1_1AllocatorManager_ad172ad959d33123014963ff2d1c7584b.html#ad172ad959d33123014963ff2d1c7584b">GetCache</a></td></tr>
          <tr><td class="navtab"><a class="qindexHL" href="classTheron_1_1AllocatorManager_a9ecdc8b1ae227f95a1eae7a2d399a9c0.html#a9ecdc8b1ae227f95a1eae7a2d399a9c0">SetAllocator</a></td></tr>
        </table>
      </div>
   </td>
   <td valign="top" class="mempage">
<a class="anchor" id="a9ecdc8b1ae227f95a1eae7a2d399a9c0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void Theron::AllocatorManager::SetAllocator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classTheron_1_1IAllocator.html">IAllocator</a> *const&#160;</td>
          <td class="paramname"><em>allocator</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the allocator used for internal allocations, replacing the default allocator. </p>
<p>Calling this method allows applications to provide custom allocators and hence to control how and where memory is allocated by <a class="el" href="namespaceTheron.html" title="Main namespace containing all public API components. ">Theron</a>. This is useful, for example, in embedded systems where memory is scarce or of different available types. The allocator provided to this method must implement <a class="el" href="classTheron_1_1IAllocator.html" title="Interface describing a general-purpose memory allocator. ">IAllocator</a> and can be a wrapper around another existing allocator implementation. The provided allocator is used for all internal heap allocations, including the allocation of instantiated actors. If this method is not called by user code then a default <a class="el" href="classTheron_1_1DefaultAllocator.html" title="A simple general purpose memory allocator used by default. ">DefaultAllocator</a> is used, which is a simple wrapper around global new and delete.</p>
<div class="fragment"><div class="line">MyAllocator allocator;</div>
<div class="line"><a class="code" href="classTheron_1_1AllocatorManager_a9ecdc8b1ae227f95a1eae7a2d399a9c0.html#a9ecdc8b1ae227f95a1eae7a2d399a9c0">Theron::AllocatorManager::SetAllocator</a>(&amp;allocator);</div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>This method can't be called at static construction time.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classTheron_1_1AllocatorManager_ae9038770699e0ff14c0dd68378e8ad90.html#ae9038770699e0ff14c0dd68378e8ad90" title="Gets a pointer to the general allocator currently in use by Theron. ">GetAllocator</a> </dd></dl>

</div>
</div>
    </td>
  </tr>
</table>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
